#use "test_tkpv_parser.ml";;

let p = create ();;
let p = post 1 `y p;;
let p = post 1 `z p;;
let p = post 1 `eof p;;

flush stderr;;

if accepted p then (
	begin match result p with
	| Some (Some (A (Some `y)), Some `z) ->
		begin match errors p with
		| [] ->
			print_string "OK.\n";
		| _ ->
			raise (Failure "BAD ERRORS DETECTED!!")
		end
	| _ ->
		raise (Failure "BAD RESULT!!")
	end
) else (
	raise (Failure "NOT ACCEPTED!!")
);;
